package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindEntityList;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.file.entity.FileRecord;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.entity.CustomerPortrait;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 客户画像 VO定义
* @author MyName
* @version 1.0
* @date 2024-07-05
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class CustomerPortraitListVO extends CustomerPortrait  {
private static final long serialVersionUID = 1910488654256953973L;
    /**
    * 行业 关联字典选项
    */
    @BindDict(
    type = "industry",
    field = "industry"
    )
    private LabelValue industryLabel;

    /**
    * 配套华中系统等级 关联字典选项
    */
    @BindDict(
    type = "sysLev",
    field = "sysLev"
    )
    private LabelValue sysLevLabel;

    /**
    * 可配套核心因素 关联字典选项
    */
    @BindDict(
    type = "coreReason",
    field = "coreReason"
    )
    private LabelValue coreReasonLabel;

    /**
    * 对标竞争对手 关联字典选项
    */
    @BindDict(
    type = "competitor",
    field = "competitor"
    )
    private LabelValue competitorLabel;

    /**
    * 客户图片 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.customer_picture = id", splitBy = ",")
    private List<FileVO> customerPictureFiles;

    /**
    * 协议图片 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.deal_picture = id", splitBy = ",")
    private List<FileVO> dealPictureFiles;

    /**
    * 协议附件 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.deal_attach = id", splitBy = ",")
    private List<FileVO> dealAttachFiles;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}